<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport"
		  content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
	<title>Document</title>
	<link rel="stylesheet" href="./temp/layui/css/layui.css">
	<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
	<script src="./temp/layui/layui.js"></script>
</head>
<body>
<form class="layui-form layui-form-pane" action="" style="margin-top: 8%;margin-left: 5%">
	<div class="layui-form-item layui-form-text" style="width: 600px">
		<label class="layui-form-label">内容</label>
		<div class="layui-input-block">
			<textarea name="content"  placeholder="请输入内容"  class="layui-textarea"><?php echo $res['content'] ?></textarea>
			<input type="hidden" name='id' value="<?php echo $_GET['card_id']?>" >
		</div>
		<div class="layui-form-item" style="float: right;margin-top: 15px">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit lay-filter="keep">保存</button>
			</div>
		</div>
	</div>
</form>
<script>
    //Demo
    layui.use('form', function(){
        var form = layui.form;
        //监听提交
        form.on('submit(keep)', function(data){
            $.post("./keep.php", data.field, function(res, textStatus, xhr) {
                if (res.code == 0) {
                    layer.msg(res.msg, {icon: 6}, function () {
                    });
                } else {
                    layer.msg(res.msg, {icon: 9}, function () {
                    });
                }
            },'json');
            return false;
        });
    });
</script>
</body>
</html>